powered by
Get and set layer data
# S3 method for Assay [(x, i = missing_arg(), j = missing_arg(), ...)# S4 method for Assay,character,ANY,ANY [(x, i, j, ...) <- value
# S4 method for Assay,character,ANY,ANY [(x, i, j, ...) <- value
[: The layer data for layer i
[
i
[<-: x with layer data value saved as i
[<-
x
value
An Assay object
Assay
Name of layer data to get or set
Ignored
Arguments passed to LayerData
LayerData
A matrix-like object to add as a new layer
v3 Assay object, validity, and interaction methods: $.Assay(), Assay-class, Assay-validity, CreateAssayObject(), [[.Assay(), dim.Assay(), dimnames.Assay(), merge.Assay(), split.Assay(), subset.Assay()
$.Assay()
Assay-class
Assay-validity
CreateAssayObject()
[[.Assay()
dim.Assay()
dimnames.Assay()
merge.Assay()
split.Assay()
subset.Assay()
rna <- pbmc_small[["RNA"]] # Get a vector of layer names in this assay rna[] # Fetch layer data rna["data"][1:10, 1:4] # Set layer data rna["data"] <- rna["counts"] rna["data"][1:10, 1:4]
Run the code above in your browser using DataLab